package com.leizi.igym.enums;

import java.util.Arrays;

/**
 * @Author: leizi0110
 * @CreateTime: 2024-05-04  22:56
 * @Description:
 */

public enum DoughnutStatisticsTypeEnum {
    AGE("age"),
    LEVEL("level"),
    GENDER("gender");

    private final String type;

    public String getType() {
        return type;
    }

    DoughnutStatisticsTypeEnum(String type) {
        this.type = type;
    }

    public static DoughnutStatisticsTypeEnum getTypeValue(String type){
       return Arrays.stream(DoughnutStatisticsTypeEnum.values()).filter(x->x.getType().equals(type)).findFirst().orElse(null);
    }
}
